package com.zzh.phone.hviews;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import com.zzh.lib.views.loader.HImageLoader;

/**
 * Created by ZZH on 2022/5/17.
 *
 * @Date: 2022/5/17
 * @Email: zzh_hz@126.com
 * @QQ: 1299234582
 * @Author: zzh
 * @Description:
 */
public class GlideEnginePhoto implements HImageLoader {
    static final RequestOptions options;

    static {
        options = new RequestOptions();
        options.diskCacheStrategy(DiskCacheStrategy.ALL).skipMemoryCache(false);
    }

    public static GlideEnginePhoto getInstance() {
        return new GlideEnginePhoto();
    }

    @Override
    public void loadImage(ImageView iv, String url) {
        Glide.with(iv).asBitmap().load(url).into(iv);
    }
}
